import axios from "axios"

//获取轮播图接口
export const getBanner = () => axios.post("/dpi/banner/get")

//获取推荐歌单接口
export const getRecommend = () => axios.post("/dpi/personalized")

// /related/playlist?id=1
//推荐新碟接口
// export const getNewEditList =()=>axios.post("/dpi/top/album?offset=5&limit=3");

//新歌接口
// export const getNewSongList = ()=>axios.post("/dpi/personalized/newsong");

//热门搜索接口
export const getHotSearch = () => axios.post("/dpi/search/hot")

export const search = (word) => axios.get("/dpi/search?keywords=" + word)

//获取所有榜单
export const getTop = () => {
    return axios.get(`/dpi/toplist/detail`)
}

//获取排行榜/歌单详情
export const getTopListDetail = (id) => {
    return axios.get(`/dpi/playlist/detail?id=${id}`)
}

//获取歌曲详情
export const songDetail = (id) => {
    return axios.get(`/dpi/song/detail?ids=${id}`)
}
//电台分类
export const catelist = () => {
    return axios.get(`/dpi/dj/catelist`)
}
//付费精品
export const paylist = (limit, offset) => {
    return axios.get(`/dpi/dj/paygift?limit=${limit}&offset=${offset}`)
}
//独家放送
export const single = () => {
    return axios.get("/dpi/personalized/privatecontent")
}

//电台推荐
export const djRecommend = () => {
    return axios.get("/dpi/dj/recommend")
}
//推荐节目
export const program = () => {
    return axios.get('/dpi/program/recommend')
}
//每日推荐
export const recommend = () => {
    return axios.get('/dpi/recommend/songs')
}
export const getNewEditList = () => axios.post("/dpi/top/album?offset=5&limit=3");

//新歌接口
export const getNewSongList = () => axios.post("/dpi/personalized/newsong")


export const getDetailList = (id) => axios.post("/dpi/playlist/detail?id=" + id)

//获取电台详情
export const djDetails = (rid) => {
    return axios.get(`/dpi/dj/detail?rid=${rid}`)
}
//电台节目
export const djProgram = (rid) => {
    return axios.get(`/dpi/dj/program?rid=${rid}&limit=40`)
}
//MV排行
export const getMvList = (limit) => axios.post("/dpi/top/mv?limit=" + limit)
//MV详情页
export const getDetailMv = (id) => axios.post("/dpi/mv/detail?mvid=" + id)
//相关MV
export const getRelateMv = (id) => axios.post("/dpi/related/allvideo?id=" + id)

//获取歌词
export const getSongLyrics = (id)=>axios.post("/dpi/lyric?id="+id)

//获取歌的播放地址
export const getSongUrl =(id) => axios.post("/dpi/song/url?id="+id)
// export const getSongLyrics = () => axios.post("/dpi/lyric?id=33894312")

//获取歌的播放地址

// export const getSongUrl = () => axios.post("/dpi/song/url?id=33894312")
//获取全部歌单(仅仅分类）
export const getSongList = () => axios.post("/dpi/playlist/catlist")
//歌单(全部类型)
export const songList = ()=>axios.get('/dpi//top/playlist')


export const getSong = (id)=>axios.get("/dpi/user/playlist?uid="+id)

export const getLoginStatus = () => axios.get("/dpi/login/status")


export const getUserInfo = (id) => axios.get("/dpi/user/detail?uid="+id)


export const getLoginRefresh = () => axios.get("/dpi/login/refresh")